package com.ruoyi.alipay.service;

import com.ruoyi.alipay.domain.PaymentSettlement;

import java.util.List;

public interface PaymentSettlementService {
    
    /**
     * 查询支付列表
     * @param payment 查询条件
     * @return 支付列表
     */
    List<PaymentSettlement> selectPaymentList(PaymentSettlement payment);
    
    /**
     * 查询支付详情
     * @param id 支付ID
     * @return 支付详情
     */
    PaymentSettlement selectPaymentById(Long id);

    /**
     * 插入一条记录
     * @param payment
     * @return
     *
     * */
    int insert(PaymentSettlement payment);

    /**
     * 根据outTradeNo查询一条记录
     * @param outTradeNo
     * @return
     *
     * */
    PaymentSettlement findByOutTradeNo(String outTradeNo);
    int updateByOutTradeNo(PaymentSettlement payment);

    /**
     * 根据userId和productName查询一条记录
     * @param userId
     * @param productName
     * @return
     */
    PaymentSettlement findByUserIdAndProductName(Integer userId, String productName);

    /**
     * 根据userId查询所有记录
     * @param userId
     * @return
     */
    List<String> findPayCoursesByUserId(Integer userId);
}